

import java.util.*;
import java.io.*;

public class Candy {
	
	
	public static void main(String args[]){
		try{
			Scanner sc = new Scanner(new File("C-large.in"));//ファイル名
			PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(new File("solve.in"))));
			int T = sc.nextInt();//T
			for(int i=1;i<=T;i++){//T回

				int N = sc.nextInt();
				int min = 1000000;
				int sum = 0;
				int[] digi = new int[20];
				for(int j=0;j<N;j++){
					int value = sc.nextInt();
					if(min>value)min=value;
					sum += value;
					for(int t=0;t<20;t++){
						if(value % Math.pow(2,(t+1)) >= Math.pow(2,t))digi[t]++;
					}
				}
				boolean bl = true;
				for(int t=0;t<20;t++){
					if(digi[t]%2 == 1)bl = false;
				}
				if(bl)pw.println("Case #"+i+": "+(sum-min));
				else pw.println("Case #"+i+": NO");
			}
			pw.close();
		}catch(FileNotFoundException e){
			System.out.println(e);
		}catch(IOException e){
			System.out.println(e);			
		}
	}
	
}
